'use strict';
const mongoose = require('mongoose');

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1549983309466_3829';
  
  exports.mongoose = {
    // url: 'mongodb://127.0.0.1:27017/crqs_demo',
    url: 'mongodb://123.59.194.176:27017/crqs',
    options: {}
  };

  // add your config here
  config.middleware = [];

  config.security = {
    csrf: {
      enable: false,
      ignoreJSON: true
    },
    domainWhiteList: ['http://localhost:8081','http://localhost:9528']
  };



  config.cors = {
    origin: '*',
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH'
  };

  return config;
};